# $Id$
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgbase=phonon
pkgname=(phonon-qt5)
pkgdesc="The multimedia framework by KDE"
pkgver=4.10.1
pkgrel=2
arch=(x86_64)
url='http://phonon.kde.org/'
license=(LGPL)
depends=(libpulse qt5-base phonon-qt5-backend)
optdepends=('pulseaudio: PulseAudio support' 'qt5-tools: Designer plugin')
makedepends=(extra-cmake-modules qt5-tools)
source=("http://download.kde.org/stable/$pkgbase/$pkgver/$pkgbase-$pkgver.tar.xz"{,.sig})
sha256sums=('e5a98df31aeffc22493afc8d6adbca5d6f0c27cc2eed73b3be05195321e08db7'
            'SKIP')
validpgpkeys=(CB9387521E1EE0127DA804843FDBB55084CC5D84) # Harald Sitter <sitter@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgbase-$pkgver \
    -DCMAKE_SKIP_RPATH=ON \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=ON \
    -DPHONON_BUILD_PHONON4QT5=ON \
    -DCMAKE_INSTALL_LIBDIR=lib
  make
}

package_phonon-qt5(){
  cd build
  make DESTDIR="$pkgdir" install
}
